/**
 * Copyright(C),2015 misaka15842
 * @author misaka15842 (misakamoe@yahoo.com)
 * 
 * 渲染器各接口声明
 */

#ifndef BASE_RENDERER_H_
#define BASE_RENDERER_H_

#include <stdexcept>
#include <string>

#include "Draw.h"
#include "ITexture.h"

namespace misaka
{
    class BaseRenderer
    {
        public:
            BaseRenderer();
            BaseRenderer(const BaseRenderer&)=delete;
            BaseRenderer(BaseRenderer&&)=delete;
            BaseRenderer& operator=(const BaseRenderer&)=delete;
            BaseRenderer& operator=(BaseRenderer&&)=delete;

            /* abstract class */
            virtual ~BaseRenderer();

            /* interface */
            virtual bool copy_texture(const ITexture&,const Rectangular<uint32_t>&)=0;
    };

    template<typename REAL_RENDERER_CLASS>
    class RendererInterface
    {
        public:
            RendererInterface()=delete;

            static BaseRenderer* getInstance()
            {
                static REAL_RENDERER_CLASS renderer;
                return renderer;
            }
    };
}

#endif // BASE_RENDERER_H_
